玩家将按住空格键进行投篮,投出的轨迹可以通过按向左键和向下键设置。

  • 中,将 Space Bar 拖动到程序底部。删除 .jump() 指令。
  • 点击 并为 ball 拖出 Sprite Gravity On
  • 使用 Set x Speed ,将 ball 的水平速度设置为 left_count 的值。
  • 使用 Set y Speed ,将 ball 的垂直速度设置为 down-count 的值。

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)